package com.darker.secking.service.impl;

import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
import com.darker.secking.entity.SeckingGoods;
import com.darker.secking.mapper.SeckingGoodsMapper;
import com.darker.secking.service.ISeckingGoodsService;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

/**
 * <p>
 *  服务实现类
 * </p>
 *
 * @author darker
 * @since 2022-10-06
 */
@Service
public class SeckingGoodsServiceImpl extends ServiceImpl<SeckingGoodsMapper, SeckingGoods> implements ISeckingGoodsService {

    @Autowired
    SeckingGoodsMapper seckingGoodsMapper;

    @Override
    public SeckingGoods getSeckingGoodsByGoodsId(Long goodId) {
        LambdaQueryWrapper<SeckingGoods> queryWrapper = new LambdaQueryWrapper<>();
        queryWrapper.eq(SeckingGoods::getGoodsId,goodId);
        SeckingGoods seckingGoods = seckingGoodsMapper.selectOne(queryWrapper);
        return seckingGoods;
    }
}
